define(function(require, exports){

require('jquery');
require('utility');
require('handlebars');

var fn = require('/js/fn.js');


var F = {
	init : function(){
		F.getGameList();
	},

	getGameList : function(){
		fn.ajaxGet({
			url : '/api/gamelist',
			success : function(json){
				F.renderGameList(json.data);
			}
		});
	},

	renderGameList : function(data){
		var tpl = $('#js_elem_tpl').html();
		tpl = KG.Handlebars.compile(tpl)({
			game : data
		});

		$('.row').html(tpl);
	}
};

exports.init = function(){
	fn.initFirstNav('game');

	

	F.init();
};

});